import instance from '../../utils/request'

/**
 * 查询出库订单
 * @param params
 * @returns {*}
 */
export function findOutOrder(params) {
    return instance.get("/crm/outorder/getOutOrder", {params: params});
}

/**
 * 生成出库单
 * @param id
 * @returns {*}
 */
export function generateOutRepo(id) {
    return instance.get("/crm/outrepo/generateOutRepo", {params: {id: id}});
}

/**
 * 查询出库单
 * @param params
 * @returns {*}
 */
export function findOutRepo(params) {
    return instance.get("/crm/outrepo/getOutRepo", {params: params});
}

/**
 * 查询商品，获得OutrepogoodsVO
 * @param id
 */
export function getGoods(id) {
    return instance.get("/crm/outrepo/getGoods", {params: {id: id}});
}

/**
 * 录入出库单
 * @param params
 */
export function enter(params) {
    return instance.post("/crm/outrepo/enterOutRepoGoods", params);
}

/**
 * 审核结果
 * @param params
 * @returns {*}
 */
export function approveOutRepo(params) {
    return instance.post("/crm/outrepo/approveOutRepo", params)
}

/**
 * 出库
 * @param id
 * @returns {*}
 */
export function repoOut(id) {
    return instance.get("/crm/outrepo/repoOut",{params:{id:id}});
}